machinationsfandomcom-20200214-history
The Basic Toggler Config
The Basic Toggler Config (a short tutorial from Aquatarkus) Q: What is a Toggler Config? A : Toggler Configs are Q3 engine executable text files that will allow a toggling effect for console commands and console variables through a keyboard key of your choice. Some console commands are already designed to toggle on and off like 'god, noclip, notarget' as an example. But most do not and often have a number value of 0 and 1 to represent an on or off state. This is where a config would be needed to toggle the 0 to 1 with the use of only one binded key. They focus on the VSTR and SET functions. Q: Can I make configs? How? A: Sure, the first thing to do is become familiar with the console commands and Console variables and then choose an effect that you would like to have a binded key for. Then choose the key you want to use that will activate and deactivate the console effect. Let's Build a Simple One... (only if you're already familiar with console) Function: Lets make the Red and Blue Mana/Health bars go away when we depress the 'H' key and become visible again when we press the 'H' key again. Console Commands: ui_hud 0 (to remove) ui_hud 1 (to re-display the hud) Open your windows note pad and begin to enter the lines. 1: choose a common name to set as a loop marker for all lines in the config. We'll call it 'huder'. 2: choose 2 names to mark the 'on' and 'off' toggle point. We'll call them 'hudin' and 'hudout' 3: Now lets set the first stage of the loop by making the hud visible and let the next marker make it invisible. set hudout "ui_hud 1; set huder vstr hudin; 4: Lets send a confirming text line to the console in a new line. echo H=Hud ON .." 5: Now lets set the second stage of the loop by making the hud invisible and stand by to make it visible again. set hudin "ui_hud 0; set huder vstr hudout; 6: Lets send a confirming text line to the console in a new line. echo H=Hud OFF..." 7: Lets set our config's default condition when the config is active set huder "vstr hudin" 8: Let's tell the config to bind the 'h' key to our common name so it knows to flip between statements each time it's depressed. bind h "vstr huder" ***YOU'RE DONE*** The config should look like this on your note pad: set hudout "ui_hud 1; set huder vstr hudin; echo H=Hud ON .." set hudin "ui_hud 0; set huder vstr hudout; echo H=Hud OFF..." set huder "vstr hudin" bind h "vstr huder" Save the file as a plain text file. (choose a name you'll remember like HUD.txt) Change the file extention from .txt to .cfg Place the hud.cfg file into your Alice/Base directory. Execute it once to activate it at any time during the game. At the console type in: exec hud.cfg You should now be able to remove the red and blue mana/health bars with the H key, and make them come back again at any time with the H key again. If something goes wrong and you get stuck. Use the console command to recover your hud to a normal visible state. At the console type in: ui_hud 1 Failures are usually due to spelling errors, forgotten quotes, missing semi-colons, or spacing between statements. Once you're successful, use this as a template for building more configs....... Enjoy, Aquatarkus Category:Mods